﻿using System;
using System.ComponentModel.DataAnnotations;

namespace NandleNF.DataType.Endereco
{
    [Serializable()]
    [Table("Endereco")]
    public class TEndereco
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public Int32 EnderecoID { get; set; }

        [StringLength(8)]
        public Int32? Cep { get; set; }

        [Required]
        [StringLength(100)]
        public String Logradouro { get; set; }

        [Required]
        [StringLength(70)]
        public String Bairro { get; set; }

        [Required]
        public TEstado Estado { get; set; }

        [Required]
        public TCidade Cidade { get; set; }

        public TRegiao Regiao { get; set; }

        #region [ Auditoria ]

        public System.Nullable<DateTime> DataInclusao { get; set; }

        [StringLength(15)]
        public String IpUsuarioInclusao { get; set; }

        [StringLength(30)]
        public String NomeUsuarioInclusao { get; set; }

        public DateTime DataAlteracao { get; set; }

        [StringLength(15)]
        public String IpUsuarioAlteracao { get; set; }

        [StringLength(30)]
        public String NomeUsuarioAlteracao { get; set; }

        #endregion
    }
}
